package com.woniuxy.vouchers.controller;

import com.github.pagehelper.PageInfo;
import com.woniuxy.commons.request.ResponseResult;
import com.woniuxy.vouchers.service.RecordService;
import com.woniuxy.vouchers.vo.RecordVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/vouchersrecord")
public class RecordController {

    @Resource
    private RecordService recordService;
    @GetMapping("/findAll")
    public ResponseResult<PageInfo<RecordVo>> findAll(Integer currentPage, Integer pageSize, String name){
        return new ResponseResult<>(ResponseResult.OK,recordService.findAll(currentPage,pageSize,name));
    }

}
